﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using CN.DBML;

namespace CityNavigation
{
    public partial class TransferLine : System.Web.UI.Page
    {
        private CityNavigationDataContext dc = new CityNavigationDataContext(System.Configuration.ConfigurationManager.ConnectionStrings["CityNavigationConnectionString"].ConnectionString);

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!this.IsPostBack)
            {

                if (this.Page.Request.QueryString["ss"] != null && this.Page.Request.QueryString["es"] != null)
                {
                    this.getLines(this.Page.Request.QueryString["ss"].ToString(), this.Page.Request.QueryString["es"].ToString());
                }

            }
        }

        private void getLines(string ss, string es)
        {
            this.GridView1.DataSource = dc.GetLines0(ss, es);
            this.GridView1.DataBind();

            this.GridView2.DataSource = dc.GGetLines1(ss, es);
            this.GridView2.DataBind();
        }
    }
}